import { connect } from "react-redux";

function Index(props) {
    const { number, info } = props

    return <div >
        <p>  {info.name ? `hello, my name is ${info.name}` : 'what is your name'} ,
            {info.mes ? info.mes : ' what do you say? '} </p>
        《React进阶实践指南》 {number} 👍 <br />
    </div>
}

const mapStateToProps = state => ({number: state.number, info: state.info})

export default connect(mapStateToProps)(Index)